Skip to content

docs: add allowed-tools frontmatter documentation to plugin-structure skill#93

Merged
sjnims merged 2 commits intomainfrom
docs/91-add-allowed-tools-frontmatter-docs
Dec 10, 2025
Merged

docs: add allowed-tools frontmatter documentation to plugin-structure skill#93
sjnims merged 2 commits intomainfrom
docs/91-add-allowed-tools-frontmatter-docs

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 10, 2025

Summary

Add documentation for the allowed-tools frontmatter field to the Skills section of the plugin-structure skill, enabling users to discover this capability when learning about plugin skills.

Problem

Fixes #91

The plugin-structure skill documents skills as a plugin component type but doesn't mention the allowed-tools frontmatter field that skills can use to restrict tool access. This feature is documented in:

  • Official Claude Code docs
  • Repository CLAUDE.md

But was missing from the plugin-structure skill where users would naturally look for skill configuration options.

Solution

Added a Tool restrictions subsection after the SKILL.md format example that:

  • Explains the purpose of allowed-tools
  • Provides a concrete example with Read, Grep, Glob
  • Lists use cases (read-only workflows, security-sensitive tasks, limited-scope operations)

Alternatives Considered

  • Adding to skill-development skill instead: Rejected because plugin-structure covers skill configuration format, while skill-development focuses on content creation
  • Adding to both skills: Rejected to avoid duplication; plugin-structure is the appropriate location for frontmatter documentation

Changes

  • plugins/plugin-dev/skills/plugin-structure/SKILL.md: Added allowed-tools documentation (12 lines)

Testing

  • Markdownlint passes
  • Documentation follows existing patterns in the file

🤖 Generated with Claude Code

… skill

Document the allowed-tools frontmatter field in the Skills section of
the plugin-structure skill. This capability allows skills to restrict
tool access for read-only workflows, security-sensitive tasks, or
limited-scope operations.

Fixes #91

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude finished @sjnims's task in 1m 7s —— View job


PR Review Complete ✅

Summary

Looks good! This PR appropriately documents the allowed-tools frontmatter field for skills, addressing a documentation gap identified in issue #91.


What's Good

  1. Correct Placement: The documentation is added in the right location - within the Skills section of plugin-structure, immediately after the SKILL.md format example. This is exactly where users would look for skill frontmatter options.

  2. Clear Example: The YAML example is well-structured and demonstrates a practical use case (safe-reader with read-only tools).

  3. Appropriate Use Cases: The description "Use for read-only workflows, security-sensitive tasks, or limited-scope operations" provides concrete scenarios when this feature is valuable.

  4. Consistent with Existing Docs: The change aligns with documentation in CLAUDE.md (lines 73-77) and follows the same pattern used for agents.

  5. Markdown Quality: Markdownlint passes with no errors. The formatting follows repository conventions.


Suggestions

Minor Enhancement (Optional): Consider adding a cross-reference to the agents section, since agents also support allowed-tools. Something like:

**Note**: Agents also support `allowed-tools` for tool restrictions (see Agents section).

However, this is purely optional - the current documentation is complete and self-contained.


Checklist Verification

  • Component Documentation: Correctly documents skill frontmatter field
  • Markdown Linting: markdownlint passes with no errors
  • Placement: Documentation added in appropriate section (Skills, not skill-development)
  • Examples: Includes concrete YAML example with realistic use case
  • Consistency: Aligns with existing documentation patterns in CLAUDE.md
  • Completeness: Fixes the documentation gap identified in issue [Docs]: Add allowed-tools frontmatter documentation to plugin-structure skill #91

Recommendation: Approve and merge. This is a clean documentation addition that helps users discover an existing feature.

@sjnims sjnims self-assigned this Dec 10, 2025
@claude claude Bot added documentation Improvements or additions to documentation component:skill Skills layer effort:small < 1 hour labels Dec 10, 2025
Add "(optional)" label and inline comment to make clear that
allowed-tools is not a required field for skills.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sjnims
Copy link
Copy Markdown
Owner Author

sjnims commented Dec 10, 2025

@claude please review this PR with the additional commit

@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude finished @sjnims's task in 1m 18s —— View job


PR Review Complete ✅

Reviewing the additional commit in PR #93...

Todo List

  • Read the modified SKILL.md file
  • Review the latest commit changes
  • Analyze documentation quality and accuracy
  • Verify consistency with repository conventions
  • Post comprehensive review feedback

Summary

Excellent improvement! The additional commit (5ac0f77) makes a meaningful clarification that enhances the documentation quality. The changes are well-thought-out and address a potential source of confusion.


What Changed in the Latest Commit

The commit "docs: clarify allowed-tools is optional frontmatter" made two small but impactful changes to lines 203 and 209:

  1. Line 203: Changed section header from **Tool restrictions**: to **Tool restrictions** (optional):
  2. Line 209: Added inline comment: allowed-tools: Read, Grep, Glob # Optional: restricts available tools

Analysis

✅ Strengths

  1. Clarifies Optional Nature: The (optional) marker in the section header immediately signals to readers that this is not a required field. This prevents confusion for developers who might think allowed-tools is mandatory.

  2. Reinforces the Message: The inline comment in the YAML example (# Optional: restricts available tools) provides a second reinforcement at the point of use, which is excellent for copy-paste scenarios.

  3. Consistent with Repository Patterns: This follows the documentation style used elsewhere in the file (e.g., "Custom Path Configuration" sections that explain optional features).

  4. Matches CLAUDE.md: The changes align perfectly with CLAUDE.md:158-166, which describes allowed-tools as "optional frontmatter" for both skills and agents.

  5. Improves Discoverability: The dual reinforcement (header + inline comment) ensures developers understand this is an opt-in security feature, not a required configuration.

📋 Verification Checklist

  • Accuracy: Correctly represents allowed-tools as optional
  • Consistency: Aligns with CLAUDE.md documentation (lines 156, 158-166)
  • Formatting: YAML syntax remains valid with inline comment
  • Markdown Quality: No linting errors
  • Placement: Positioned correctly within Skills section
  • Completeness: Provides both conceptual and practical clarity

Impact Assessment

Before: Developers might assume allowed-tools was required since there was no explicit indication it was optional.

After: Developers clearly understand this is an optional security feature they can use when needed, reducing potential confusion during plugin development.


Minor Observations

  1. Comment Placement: The inline comment is positioned correctly at the end of the YAML line, following standard YAML comment conventions.

  2. Wording Choice: Using "Optional: restricts available tools" is clear and concise—it both confirms the optional nature AND explains the purpose in one phrase.

  3. No Redundancy Concerns: While there are two mentions of "optional," they serve different purposes (section header vs. usage example) and both add value.


Recommendation

Strong Approve

This is a textbook example of incremental documentation improvement:

  • Small, focused change
  • Addresses a real source of potential confusion
  • Maintains consistency with existing documentation
  • Follows repository conventions
  • Enhances user experience without adding bloat

The PR is ready to merge. Both commits work together effectively:

  1. First commit adds the missing documentation
  2. Second commit clarifies the optional nature

@claude
Copy link
Copy Markdown

claude Bot commented Dec 10, 2025

Claude finished @sjnims's task in 59s —— View job


PR Review Complete ✅

Summary

Excellent update! The additional commit addresses the previous review feedback by clarifying that allowed-tools is optional. The documentation is now precise, accurate, and follows repository conventions perfectly.


What's Good

  1. Perfect Clarification: The latest commit (5ac0f77) explicitly labels allowed-tools as "(optional)" in the section header and adds an inline comment in the YAML example. This resolves any ambiguity about whether the field is required.

  2. Correct Placement: The documentation is appropriately positioned in the Skills section of plugin-structure, immediately after the SKILL.md format example. This is exactly where users would look for skill frontmatter options.

  3. Clear Example: The YAML example (safe-reader with read-only tools) demonstrates a practical use case with helpful inline documentation.

  4. Appropriate Use Cases: The description "Use for read-only workflows, security-sensitive tasks, or limited-scope operations" provides concrete scenarios when this feature is valuable.

  5. Consistent with Repository Standards:

    • Aligns with documentation in CLAUDE.md (lines 73-77)
    • Follows the same pattern used for agents (who also support allowed-tools)
    • Matches the repository's documentation style
  6. Clean Markdown: Markdownlint passes with no errors. All formatting follows repository conventions.


Changes Reviewed

Commit 26a1154 (Initial):

  • Added allowed-tools documentation with example and use cases

Commit 5ac0f77 (Latest):

  • Added "(optional)" label to section header
  • Added inline comment # Optional: restricts available tools in YAML example
  • Makes it crystal clear this is not a required field

Checklist Verification

  • Component Documentation: Correctly documents optional skill frontmatter field
  • Markdown Linting: markdownlint passes with no errors
  • Placement: Documentation added in appropriate section (Skills)
  • Examples: Includes concrete YAML example with inline documentation
  • Consistency: Aligns with existing documentation patterns in CLAUDE.md
  • Completeness: Fixes the documentation gap identified in issue [Docs]: Add allowed-tools frontmatter documentation to plugin-structure skill #91
  • Clarity: Latest commit makes optional nature explicit

Recommendation: Approve and merge. This PR is ready to go - the documentation is clear, accurate, well-placed, and properly indicates that allowed-tools is optional.


@sjnims sjnims merged commit 7c1ae8a into main Dec 10, 2025
7 checks passed
@sjnims sjnims deleted the docs/91-add-allowed-tools-frontmatter-docs branch December 10, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:skill Skills layer documentation Improvements or additions to documentation effort:small < 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add allowed-tools frontmatter documentation to plugin-structure skill

1 participant